<?php
$this->headTitle($this->translate('Image street'));
$this->headScript()
    ->appendScript('
$(function(){
    $("map area").mouseover(function(){
        $(this).next("div.tip").slideDown(300)
        .siblings().fadeOut();
    });
});
');
$this->headStyle('
.tip{background: none repeat scroll 0 0 white;
    border: 5px solid #B9DDFE;
    font-size: 14px;
    left: 300px;
    position: absolute;
    top: 600px;
    display:none;
    overflow:hidden;}
.tip pre{
    border:1px dashed #D6D6D6;
    padding: 10px 20px;margin:0;
}
');
?>


<h2>
	<a href="<?php echo $this->url(array(
        'action'=> 'index'))?>"><?php echo $this->translate('Back to image index')?></a>
    <span>查看居委会</span>
</h2>

<dl class="zend_form">
<dt>&nbsp;</dt>
<dd>
<fieldset>
    <legend>查看居委会</legend>
    <dl><dt></dt><dd>
    <a href="#" onclick="$('#map').fadeIn('slow');$(this).slideUp('slow');">
    <img src="<?php echo $this->STATIC_URL?>/styles/people/images/street/<?php echo $this->street->sid?>-small.jpg" border="0" /></a>
    
    <div id="map" style="display:none;">
    <img src="<?php echo $this->STATIC_URL?>/styles/people/images/street/<?php echo $this->street->sid?>.jpg" border="0" usemap="#Map" />
<map name="Map" id="Map">
<?php foreach ($this->villages as $village): ?>
    <area shape="rect" coords="<?php echo $village->area?>"
     href="<?php echo $this->url(array('action'=> 'village', 'vid'=> $village->vid))?>" />
    <div class="tip"><pre><h2><?php echo $village->name?></h2><p><?php echo$village->intro?></p></pre></div>
<?php endforeach;?>
<?php foreach ($this->groups as $group): ?>
    <area shape="rect" coords="<?php echo $group->area?>"
     href="<?php echo $this->url(array('controller'=> 'family', 'action'=> 'floor', 'aid'=> $group->aid))?>" />
<?php endforeach;?>
</map></dd></dl>
    </div>
</fieldset>
</dd>
</dl>